home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / mus / play / DelfMPEG.lha / DelfMPEG / rexx / info < prev    next >
Text File  |  2002-10-30  |  1KB  |  52 lines

  1. /** DelfMPEG ARexx test **/
  2.  
  3. /* usage: rx info */
  4.  
  5. ADDRESS DELFMPEG
  6. OPTIONS RESULTS
  7.  
  8. GETSTATUS
  9. text='unknown'
  10. if result==0 then text='stop'
  11. if result==1 then text='play'
  12. if result==2 then text='pause'
  13. if result==10 then text='error: initDelfina failed'
  14. if result==20 then text='error: file not found'
  15. if result==30 then text='error: file not recognized as MPEG1 audio'
  16. say 'DelfMPEG status: ' || result || ' (' || text || ')'
  17.  
  18. GETFILENAME
  19. say 'file name: ' || result
  20.  
  21. GETFILETYPE
  22. say 'file type: ' || result
  23.  
  24. GETDURATION
  25. say 'duration: ' || result || ' seconds'
  26.  
  27. GETPOSITION
  28. say 'position: ' || result || ' seconds'
  29.  
  30. say 'ID3v1 tag info'
  31. GETTITLE
  32. if result=='' then say '(none)'
  33. /*
  34. ** note: it's safe to assume that the ID3 tag info is not available
  35. ** if any of the strings is emtpy, then the others are emtpy, too.
  36. ** this means that either the MPEG file has no ID3 tag or DelfMPEG
  37. ** didn't read it because the SHOWTAG option was not specified.
  38. */
  39. else do
  40.     say '  title: ' || result
  41.     GETARTIST
  42.     say ' artist: ' || result
  43.     GETALBUM
  44.     say '  album: ' || result
  45.     GETCOMMENT
  46.     say 'comment: ' || result
  47.     GETYEAR
  48.     say '   year: ' || result
  49.     GETGENRE
  50.     say '  genre: ' || result
  51. end
  52.